home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
checkt1a
/
frmtest.frm
next >
Wrap
Text File
|
1999-09-05
|
4KB
|
144 lines
VERSION 5.00
Object = "{48A63D17-6321-11D3-9D68-B4C643584542}#10.0#0"; "TMaxHtml.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form FrmTest
BorderStyle = 4 'Fixed ToolWindow
Caption = "THtml Demo"
ClientHeight = 3435
ClientLeft = 45
ClientTop = 285
ClientWidth = 6795
Icon = "FrmTest.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3435
ScaleWidth = 6795
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin HtmlWiz.TMaxHtml TMaxHtml1
Left = 3360
Top = 480
_ExtentX = 450
_ExtentY = 450
End
Begin VB.CommandButton CmdView
Caption = "&View File"
Height = 255
Left = 1680
TabIndex = 6
Top = 120
Width = 1095
End
Begin RichTextLib.RichTextBox rt1
Height = 2535
Left = 1680
TabIndex = 5
Top = 720
Width = 5055
_ExtentX = 8916
_ExtentY = 4471
_Version = 393217
ScrollBars = 3
RightMargin = 10000
TextRTF = $"FrmTest.frx":0442
End
Begin VB.ComboBox ComPattern
Height = 315
Left = 120
TabIndex = 4
Top = 3000
Width = 1455
End
Begin VB.DriveListBox Drive1
Height = 315
Left = 120
TabIndex = 2
Top = 120
Width = 1455
End
Begin VB.DirListBox Dir1
Height = 765
Left = 120
TabIndex = 1
Top = 480
Width = 1455
End
Begin VB.FileListBox File1
Height = 1650
Left = 120
OLEDragMode = 1 'Automatic
TabIndex = 0
Top = 1320
Width = 1455
End
Begin VB.Label Lbl1
AutoSize = -1 'True
Height = 195
Left = 1680
TabIndex = 3
Top = 480
Width = 45
End
End
Attribute VB_Name = "FrmTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Author : TEH
'Mailto : tehmax@cyberdude.com
'
'FrmTest.frm
'THtml.ocx demostration form.
'File1_Click - trigger THtml.CheckTitle for HTM(L) or ASP file ONLY.
'CmdView_Click - convert HTML File to Text File.
Public FileSelect$
Private Sub CmdView_Click()
If InStr(1, UCase$(FileSelect$), ".ASP") Or InStr(1, UCase$(FileSelect$), ".HTM") Then
TMaxHtml1.ConvH2T (FileSelect$)
rt1.LoadFile TMaxHtml1.H2tFile, rtfText
Else
rt1.LoadFile FileSelect$, rtfText
End If
End Sub
Private Sub ComPattern_Click()
File1.Pattern = ComPattern.List(ComPattern.ListIndex)
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
On Error GoTo DriveError
Dir1.Path = Drive1.Drive
Exit Sub
DriveError:
Drive1.Drive = Dir1.Path
Resume Next
End Sub
Private Sub File1_Click()
Lbl1.Caption = ""
If Len(File1.Path) > 3 Then
FileSelect$ = File1.Path & "\" & File1.List(File1.ListIndex)
Else
FileSelect$ = File1.Path & File1.List(File1.ListIndex)
End If
Me.Caption = FileSelect$
If InStr(1, UCase$(FileSelect$), ".ASP") Or InStr(1, UCase$(FileSelect$), ".HTM") Then
Lbl1.Caption = "Title : " & TMaxHtml1.CheckTitle(FileSelect$)
End If
End Sub
Private Sub Form_Load()
ComPattern.AddItem "*.*"
ComPattern.AddItem "*.HTM"
ComPattern.AddItem "*.ASP"
ComPattern.ListIndex = 0
End Sub